<template>
    <view class="gui-dark-bg-level-3 gui-padding gui-margin-top">
        <button type="default" :disabled="disabled" :style="{background:base.qjcolor,opacity:disabled?0.6:1}"
                class="gui-button gui-noborder" @tap="tap" style="border-radius:50rpx;">
            <text v-if="icon" class="gui-icons gui-color-white">{{icon}} &nbsp;</text>
            <text class="gui-color-white gui-button-text">{{label}}</text>
        </button>
    </view>
</template>

<script>
    export default {
        name: "hyb-button",
        props: {
            label: {
                type: String,
                default: ""
            },
            icon: {
                type: String,
                default: ""
            },
            disabled: {
                type: Boolean,
                default: false
            },
        },
        computed: {
            base: () => {
                return uni.storage.get("base");
            }
        },
        data() {
            return {};
        },
        methods: {
            // 修复：将方法名改为tap，与模板中的事件绑定一致
            tap() {
                // this.$emit("tap");
            }
        }
    }
</script>

<style>
</style>    